<?php


namespace App\Models\CarModels;


use App\Models\Landscaping\TaskCategory;
use App\Models\OperationManagement\JobScope;
use App\Models\SystemManagement\Employee;
use Illuminate\Database\Eloquent\Model;

class SanitationStaff extends Model
{
    protected $table = 'sanitation_staff';
    protected $fillable = ['id','scope_id','employee_id','type'];
    function scope()
    {
        return $this->belongsTo(JobScope::class,'id')->select('id','number','road_name','road_areas','road_level');
    }
    function employee()
    {
        return $this->hasMany(Employee::class,'id','employee_id')->select('id','name','phone')->with('personInfo');
    }
    function type()
    {
        return $this->belongsTo(TaskCategory::class,'id');
    }
}